1. Field of the Invention
The present invention relates to an in-focus state detection device used in a camera.
2. Description of the Prior Art
In the prior art, an in-focus state detection device for a camera which determines an in-focus state of an imaging lens by detecting a relative positional relationship between two object images formed by light fluxes transmitted through different pupil areas of the imaging lens has been well known. For example, U.S. Pat. No. 4,185,191 issued Jan. 22, 1980 discloses a device having flyeye lenses arranged in an anticipated focal plane of an imaging lens to form two images whose relative positional relationship varies in accordance with a focusing state of the imaging lens. Japanese patent applications laid-open Nos. 118019/1980 (laid open on Sept. 10, 1980) and 55-155331 (laid open on Dec. 3, 1980) disclose a so-called secondary focusing type device having two focusing lenses arranged behind the anticipated focal plane of the imaging lens. The latter device is long in total length but does not require a special optical system required in the former device.
A principle of the secondary focusing type infocus state detection device is explained with reference to FIG. 1. In a vicinity of a field aperture 2 formed in an anticipated focal plane of an imaging lens 1, a field lens 3 is arranged with an optical axis O.sub.1 thereof being aligned with that of the imaging lens 1, and two secondary focusing lenses 4a and 4b are arranged behind the field lens 3, and photo-sensor arrays 5a and 5b are arranged behind the lenses 4a and 4b. Numeral 6 denotes stops arranged in the vicinities of the secondary focusing lenses 4a and 4b.
The field lens 3 essentially focuses an exit pupil of the imaging lens 1 on pupil planes of the secondary focusing lenses. As a result, light fluxes applied to the secondary focusing lenses 4a and 4b are emitted from non-overlapping equi-area regions on the exit pupil plane of the imaging lens corresponding to the secondary focusing lenses 4a and 4b, respectively. When an object image formed in the vicinity of the field lens 3 is refocused on the planes of the sensor arrays 5a and 5b by the secondary focusing lenses 4a and 4b, the positions of the refocused images vary depending on a difference between positions in an optical axis direction of the object image. FIG. 2 illustrates this phenomenon. FIG. 2A shows an in-focus state and FIGS. 2B and 2C show a far-focus state and a near-focus state, respectively, in which the images formed on the sensor arrays 5a and 5b move on the planes of the sensor arrays 5a and 5b in opposite directions. The image light intensity distributions are photo-electically converted by photo-electric conversion elements of the sensor-arrays 5a and 5b and the relative positional relationship of the images is detected by an electrical processing circuit to determine the in-focus state.
The photo-electrically converted signals may be processed by determining the relative positional relationship between the two images (hereinafter referred to as a deviation) by determining a correlation while relatively displacing one of the images to the other by utilizing a fact that the deviation is proportional to a defocus quantity of the imaging lens 1 in order to determine the defocus quantity of the imaging lens 1.
The assignee of the present invention has proposed in U.S. patent application Ser. No. 464,578 filed on Feb. 7, 1983 that the defocus quantity of the imaging lens 1 can be calculated by the following formula: ##EQU1## where min{x-y} represents a smaller one of two real numbers x and y, k is a constant which is normally 1, a range of i is determined by a condition that i, (i+k-m), (i+k) and (i-m) must be in a closed section [1, N], N is the number of photo-electric conversion elements of each of the sensor arrays 5a and 5b, and a(i) and b(i) are outputs of the i-th (i=1-N) photoelectric conversion elements of the sensor arrays 5a and 5b, respectively.
FIG. 3 shows an example of the calculation of the correlation of the two images by the formula (1). In this example, V(m)=0 at a point where m=1.5. Accordingly, the two images deviate from each other 1.5 times as much as a width of the photo-electric conversion elements of the sensor array 5a or 5b.
In this device when the imaging lens 1 is in a defocus state, the object image is not focused on the planes of the sensor arrays 5a and 5b as shown in FIGS. 2B and 2C so that the contrast of the object images on the photo-sensing planes is lowered in accordance with the defocus state of the imaging lens 1. Accordingly, when the defocus quantity of the imaging lens 1 is very large, the outputs a(i) and b(i) from the sensor arrays 5a and 5b are lowered and an affect of noises to the outputs a(i) and b(i) increases and a rate of change of V(m) to the change of m decreases. As a result, an inaccurate defocus quantity may be detected. For example, V(m)=0 may occur for the m which does not provide two matched images. Thus, an exact in-focus state cannot be determined. The same problem arises when the contrast of the object is low.
One method for determining the reliability of the m calculated by the correlation is disclosed in U.S. Pat. No. 4,085,320 issued on Apr. 18, 1978. In this method, the reliability is deternimed depending on whether a value A representing an amplitude of the correlation graph of FIG. 3 is larger than a predetermined value or not. This method is effective when the number of photo-electric conversion elements of the sensor arrays 5a and 5b is small or an analog processing circuit for the correlation calculation is provided, but it is not always appropriate when the correlation calculation is carried out by a microprocessor after the outputs a(i) and b(i) from the sensor arrays 5a and 5b are A/D converted.
As the number of photo-electric conversion elements of the sensor arrays 5a and 5b increases, a long time is required for the correlation calculation. Thus, if the reliability of the correlation calculation is determined based on the final calculation result, too long a time is required for the determination and a rapid in-focus motion is not attained. When the number of elements is small, the precision of the defocus quantity is low.